package com.faryangsh.AspectUseSpring.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 杨志远[of2551]
 *         company qianmi.com
 *         Date    2017-06-12
 */
@RestController
public class TestController {

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public Object test() {
        if (false)
            throw new RuntimeException("This is an exception test response");
        else
            return "This is normal test response";
    }
}
